import React from 'react'
import listReducer from './listReducer'
import userReducer from './user/userReducer'
import { legacy_createStore as createStore, combineReducers, applyMiddleware } from 'redux'
import thunk, { ThunkMiddleware } from 'redux-thunk'

import logger from 'redux-logger'
const reducer = combineReducers({
	listReducer,
	userReducer
})

export type RootState = ReturnType<typeof reducer>

const store = createStore(reducer, applyMiddleware(thunk, logger))

export default store